package com.cloud.mall.order;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.cloud.base.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 
 * </p>
 *
 * @author jobob
 * @since 2021-07-05
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("tb_order_item")
public class TbOrderItem extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @TableId("id")
    private String id;

    /**
     * 商品id
     */
    @TableField("item_id")
    private Long itemId;

    /**
     * 订单id
     */
    @TableField("order_id")
    private String orderId;

    /**
     * 商品购买数量
     */
    @TableField("num")
    private Integer num;

    /**
     * 商品标题
     */
    @TableField("title")
    private String title;

    /**
     * 商品单价
     */
    @TableField("price")
    private BigDecimal price;

    /**
     * 商品总金额
     */
    @TableField("total_fee")
    private BigDecimal totalFee;

    /**
     * 商品图片地址
     */
    @TableField("pic_path")
    private String picPath;

    /**
     * 1库存已锁定 2库存已释放 3-库存减扣成功
     */
    @TableField("status")
    private Integer status;

    /**
     * 创建时间
     */
    @TableField("create_time")
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @TableField("update_time")
    private LocalDateTime updateTime;


}
